function error = SimpleWorker( InitData, dataSample, Rules,...
  Params )
  
  rulesCount = size(Rules,1);

  values = zeros(InitData.FeatureCount, 1);
  RulleActivation = zeros(rulesCount, 2);

  error = 0;
  
  for i=1: InitData.ElementCount
    for j=1:rulesCount
      for k =1: InitData.FeatureCount
        values(k) = InitData.FuzzySetHandler(dataSample(i,k), Params(Rules(j,k),:,k));
      end%for k
      %[value, index]
      [RulleActivation(j,1),RulleActivation(j,2)] = min(values);
    end%for j
    [~,index] = max(RulleActivation);
    
    resultClass = Rules(index,end);
    etalonClass = dataSample(i, end);
    
    if (etalonClass ~= resultClass)
      error = error + 1;
    end
  end %for i
  
end

